package org.wm.springcloud.service;

import com.wm.entities.CommonResult;
import com.wm.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @ClassName:PaymentFeginService
 * @Description: 支付远程调用接口
 * @Author:Deamer
 * @Date:2021/11/26 21:52
 **/
@Component
@FeignClient(value = "cloud-payment-service")
public interface PaymentFeginService {

    // 调取支付服务的支付接口
    @GetMapping(value = "/payment/get/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);


    @GetMapping(value = "/payment/fegin/timeout")
    String paymentFeginTimeOut();
}
